logo

scripts

A bunch of scripts, some to be moved to their own repository git clone https://anongit.hacktivis.me/git/scripts.git/

fix img data-src.js (489B)


  1. // ==UserScript==
  2. // @name fix img data-src
  3. // @namespace https://hacktivis.me/
  4. // @description assign data-src attribute to src attribute on images
  5. // @include http://knowyourmeme.com/*
  6. // @include http://mrjakeparker.com/*
  7. // @version 1.0.1
  8. // @grant none
  9. // ==/UserScript==
  10. var input = document.getElementsByTagName("img");
  11. var src;
  12. for (i = 0; i < input.length; i++) {
  13. if (src = input[i].getAttribute("data-src")) { input[i].setAttribute("src", src); }
  14. }